<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
<h:body>
    <h:form id="uploadForm" enctype="multipart/form-data">
        <h:panelGrid columns="1">
            <h:panelGroup rendered="#{foruploadpagebean.uploaded==false}">
                <t:inputFileUpload id="fileUpload" value="#{foruploadpagebean.uploadedFile}"/>
                <h:commandButton value="Загрузить" action="#{foruploadpagebean.uploadFile}">
                </h:commandButton>
            </h:panelGroup>
            <h:commandLink action="#{foruploadpagebean.clearAndGoEmptyPage}"
                           rendered="#{foruploadpagebean.uploaded==false}">
                <h:outputText value="Отмена"/>
            </h:commandLink>
            <h:commandButton value="Сбросить" action="#{foruploadpagebean.clearAndGoEmptyPage}"
                             rendered="#{foruploadpagebean.uploaded==true}"/>
            <h:outputText value="#{foruploadpagebean.oldFileName}" rendered="#{foruploadpagebean.uploaded==true}"/>
            <h:outputText value="Выберите формат:" rendered="#{foruploadpagebean.uploaded==true}"/>
            <h:selectOneListbox value="#{foruploadpagebean.protocol}" rendered="#{foruploadpagebean.uploaded==true}">
                <f:selectItem itemValue="ini" itemLabel="ini"/>
                <f:selectItem itemValue="xml" itemLabel="xml"/>
                <f:selectItem itemValue="props" itemLabel="properties"/>
            </h:selectOneListbox>
            <h:commandButton value="Получить конфигурации" action="#{foruploadpagebean.goPresentPage}"
                             rendered="#{foruploadpagebean.uploaded==true}"/>
        </h:panelGrid>
    </h:form>
</h:body>
</html>